import {
	request
} from '@/utils/request.js'

/// 真实使用的API接口
// 保存登录信息
export const docAppletSavePatientByQr = (data) => request({
	url: '/docApplet/savePatientByQr',
	method: 'post',
	data
})

// 授权登录
export const wxLoginByToken = (data) => request({
	url: '/docApplet/docLogin',
	method: 'post',
	data
})

// 绑定手机号
export const wxBindPhoneToInternet = (data) => request({
	url: '/docApplet/loginByJsCode',
	method: 'post',
	data
})

export const loginByPhoneAndAccount = (data) => request({
	url: '/docApplet/docLoginByPhoneAndCode',
	method: 'post',
	data
})

// 获取任务字典
export const getProjectTypeDict = (data) => request({
	url: '/docApplet/getProjectTypeDict',
	method: 'get',
	data
})

// 查询医生任务信息（taskStatus：全部-ALL、待执行-0、已结束-1，taskType：筛查任务-0、通知任务-1、随访任务-2，docCode：医生编码）
export const queryDocTaskList = (data) => request({
	url: '/docApplet/queryDocTaskList',
	method: 'post',
	data
})

/// 查询是否有未读通知
export const queryNotificationRed = (data) => request({
	url: '/docApplet/queryIsNoReadNews',
	method: 'post',
	data
})

// 查询筛查任务详情(projectId:任务ID，docCode：医生编码)
export const getScreenTaskDetail = (data) => request({
	url: '/docApplet/getScreenTaskDetail',
	method: 'get',
	data
})

// 查询通知任务详情
export const getAppointTaskDetail = (data) => request({
	url: '/docApplet/getAppointTaskDetail',
	method: 'get',
	data
})

// 通知任务的通知人员列表
export const getAppointPatientList = (data) => request({
	url: '/docApplet/getAppointPatientList',
	method: 'post',
	data
})

// 修改通知状态
export const changeModifyInformStatus = (data) => request({
	url: '/docApplet/modifyInformStatus',
	method: 'post',
	data
})

// 查询随访任务详情（followMainId：患者随访记录id）
export const getFollowTaskDetail = (data) => request({
	url: '/docApplet/getFollowTaskDetail',
	method: 'get',
	data
})

// 保存随访记录（）
export const saveFollowRecord = (data) => request({
	url: '/docApplet/saveFollowRecord',
	method: 'post',
	data
})

// 获取消息通知接口
export const getNotificationList = (data) => request({
	url: '/docApplet/getNewsList',
	method: 'post',
	data
})

// 修改消息通知的未读状态
export const updateNewStatus = (data) => request({
	url: '/docApplet/updateNewStatus',
	method: 'post',
	data
})
// 获取医院数据
export const getHospitalList = (data) => request({
	url: '/api/platform/docApplet/getSelfAndSubOrg',
	method: 'get',
	data
})



